home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / mac / ch08 / 08fig06.wrl < prev    next >
Text File  |  1996-09-23  |  1KB  |  57 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright 1997 By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Moving box
  8.         DEF Cube1 Transform {
  9.             children DEF ACube Shape {
  10.                 appearance Appearance {
  11.                     material Material { }
  12.                 }
  13.                 geometry Box { size 1.0 1.0 1.0 }
  14.             }
  15.         },
  16.         Transform {
  17.             translation -2.0 0.0 0.0
  18.             children DEF Cube2 Transform {
  19.                 children USE ACube
  20.             }
  21.         },
  22.         Transform {
  23.             translation 2.0 0.0 0.0
  24.             children DEF Cube3 Transform {
  25.                 children USE ACube
  26.             }
  27.         },
  28.     # Animation clock
  29.         DEF Clock TimeSensor {
  30.             cycleInterval 4.0
  31.             loop TRUE
  32.         },
  33.     # Animation path
  34.         DEF CubePath PositionInterpolator {
  35.             key [
  36.                 0.00, 0.11, 0.17, 0.22,
  37.                 0.33, 0.44, 0.50, 0.55,
  38.                 0.66, 0.77, 0.83, 0.88,
  39.                 0.99
  40.             ]
  41.             keyValue [
  42.                 0.0 0.0  0.0,  1.0 1.96 1.0,
  43.                 1.5 2.21 1.5,  2.0 1.96 2.0,
  44.                 3.0 0.0  3.0,  2.0 1.96 3.0,
  45.                 1.5 2.21 3.0,  1.0 1.96 3.0,
  46.                 0.0 0.0  3.0,  0.0 1.96 2.0,
  47.                 0.0 2.21 1.5,  0.0 1.96 1.0,
  48.                 0.0 0.0  0.0
  49.             ]
  50.         }
  51.     ]
  52. }
  53. ROUTE Clock.fraction_changed TO CubePath.set_fraction
  54. ROUTE CubePath.value_changed TO Cube1.set_translation
  55. ROUTE CubePath.value_changed TO Cube2.set_translation
  56. ROUTE CubePath.value_changed TO Cube3.set_translation
  57.